package com.wangshouyu.mp.micro.phone;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @description 微信小程序绑定手机号请求参数
 * @date 2020/8/19 10:41
 */
public class MicroBindPhoneRequest implements Serializable {

    /**
     * 小程序请求的sessionKey
     */
    private String sessionKey;

    /**
     * 加密算法的初始向量
     */
    private String iv;

    /**
     * 包括敏感数据在内的完整用户信息的加密数据
     */
    private String encryptedData;

    public String getSessionKey() {
        return sessionKey;
    }

    public void setSessionKey(String sessionKey) {
        this.sessionKey = sessionKey;
    }

    public String getIv() {
        return iv;
    }

    public void setIv(String iv) {
        this.iv = iv;
    }

    public String getEncryptedData() {
        return encryptedData;
    }

    public void setEncryptedData(String encryptedData) {
        this.encryptedData = encryptedData;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MicroBindPhoneRequest that = (MicroBindPhoneRequest) o;
        return Objects.equals(sessionKey, that.sessionKey) && Objects.equals(iv, that.iv) && Objects.equals(encryptedData, that.encryptedData);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sessionKey, iv, encryptedData);
    }

    @Override
    public String toString() {
        return "MicroBindPhoneRequest{" +
                "sessionKey='" + sessionKey + '\'' +
                ", iv='" + iv + '\'' +
                ", encryptedData='" + encryptedData + '\'' +
                '}';
    }
}
